include ../Makefile.inc

	#We use the common implicit rule is for the construction of .o (object) files out of .c (source files).
all:	cluster

cluster:	cluster_main.o cluster.o 
	@echo "Compiling cluster"
	cd ../common ; make
	gcc $(CFLAGS) -o cluster cluster_main.o cluster.o ../common/modularity_mat.o ../common/sparse_matrix.o ../common/improve_div.o  ../common/spectral_div.o -lm
	
mtrace:	cluster_main.o cluster.o 
	@echo "Compiling memory-traced cluster"
	cd ../common ; make mtrace
	gcc $(MTRACEFLAGS) $(CFLAGS) -o cluster *.c ../common/modularity_mat.o ../common/sparse_matrix.o ../common/improve_div.o  ../common/spectral_div.o -lm 

clean:
	@echo "Cleaning cluster"
	rm *.o ../common/*.o cluster


